x=float(input())
if x<=15:
    y=4*x/3
    print("%.2f"%y)
else:
    y=2.5*x-17.5
    print("%.2f"%y)